#ifndef ERR_H
#define ERR_H
#include <stdint.h>
/*ERROR_PATTERNS*/
#define ERRP_INVALID_TOKEN "Invalid token near %s"
#define ERRP_CANT_RUN "%s command not found."


#define LIBC_OPEN_ERROR  2


#define SHELL_NO_ERROR 0
#define SHELL_QUIT_ERROR  257
#define SHELL_PARSE_ERROR 258
#define SHELL_INVALID_FILENAME 259
#define SHELL_CANT_OPENFILE 260
#define SHELL_CANT_RUN_ERR 261
#define SHELL_KILL_ERR 262
#define SHELL_STUB_ERR 263


#define SHELL_SYSTEM 1
#define SHELL_CRITICAL 2
#define SHELL_FORKED_ERROR 4



typedef struct err_struct
{
    char *errmsg;
    int errnum;
    int8_t attrib;
} err_strc;

void  print_error(err_strc current_error);
err_strc make_error_struct(int errnum, int8_t attrib, const char *fmt, ...);
err_strc init_no_err();
err_strc make_quit_error();
#endif // ERR_H
